package com.abc.cloud.dao;

import com.abc.cloud.dto.count.UserFileCount;
import com.abc.cloud.entity.FileEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 文件信息表
 * 
 * @author LiJunXi
 * @email 2770063826@qq.com
 * @date 2023-10-27 13:09:54
 */
@Mapper
public interface FileDao extends BaseMapper<FileEntity> {

    void insertFile(FileEntity fileEntity);

    List<FileEntity> queryFolderFile(@Param("params") Map<String, Object> params);

    Integer countFolderFile(@Param("params") Map<String, Object> params);

    void updateUserAllFile(@Param("userId") Long userId, @Param("status") Integer status);

    void deleteFileByIds(@Param("list") List<Long> fileIds, @Param("status") Integer status);

    void updateUserFileComment(@Param("userId") Long userId, @Param("commentType") Integer status);

    List<UserFileCount> countUserFile(@Param("userId") Long userId);
}
